package org.wotou.authority.domain;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 后台操作日志
 *
 * @author zhangQ
 * @date 2017/12/7
 */
@Entity
@Table(name = "wt_wtlog")
public class wtlogDO implements Serializable {

    public static final String LOG_LEVEL_LOGIN = "1"; // 日志状态，登录日志
    public static final String LOG_LEVEL_OPERA = "2"; // 日志状态，操作日志

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    private String id;
    /**
     * 用户名
     */
    private String userName;
    /**
     * 操作结果 RESULTIF_RIGHT
     */
    private Integer resultTf;
    /**
     * 登录IP
     */
    private String loginIp;
    /**
     * 登录时间
     */
    private Date loginTime;

    /**
     * 操作时间
     */
    private Date createTime;
    /**
     * 操作系统的名称
     */
    private String loginOs;
    /**
     * 方法名称
     */
    private String scriptName;
    /**
     * 操作描述
     */
    private String description;
    /**
     * 管理员
     */
    private String adminId;
    /**
     * 日志级别 1 操作日志 2 登录日志
     */
    private String logLevel;
    /**
     * 组织id
     */
    private String orgId;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getResultTf() {
        return resultTf;
    }

    public void setResultTf(Integer resultTf) {
        this.resultTf = resultTf;
    }

    public String getLoginIp() {
        return loginIp;
    }

    public void setLoginIp(String loginIp) {
        this.loginIp = loginIp;
    }

    public Date getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getLoginOs() {
        return loginOs;
    }

    public void setLoginOs(String loginOs) {
        this.loginOs = loginOs;
    }

    public String getScriptName() {
        return scriptName;
    }

    public void setScriptName(String scriptName) {
        this.scriptName = scriptName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getAdminId() {
        return adminId;
    }

    public void setAdminId(String adminId) {
        this.adminId = adminId;
    }

    public String getLogLevel() {
        return logLevel;
    }

    public void setLogLevel(String logLevel) {
        this.logLevel = logLevel;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }
}
